const BundleAnalyzerPlugin =
	require("webpack-bundle-analyzer").BundleAnalyzerPlugin;

if (process.env.NODE_ENV === "production") {
	module.exports = {
		devtool: "eval-cheap-module-source-map",
		plugins: [new BundleAnalyzerPlugin()],
		//不用打包的库
		externals: {
			vue: "Vue",
			vuex: "Vuex",
			"vue-router": "VueRouter",
			axios: "axios",
		},
	};
} else {
	module.exports = {};
}
